package com.xidian.zhiancloud.controller.riskcontrol.riskstatistics;

import com.xidian.zhiancloud.controller.base.BaseController;
import com.xidian.zhiancloud.dto.ResultDTO;
import com.xidian.zhiancloud.enums.GeneralResponseEnums;
import com.xidian.zhiancloud.model.riskcontrol.RistStatistics;
import com.xidian.zhiancloud.service.riskcontrol.riskstatistics.TRiskStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 风险统计
 */
@RestController
@RequestMapping("/statistics")
public class TRiskStatisticsController extends BaseController {
    @Autowired
    TRiskStatisticsService tRiskStatisticsService;

    /**
     * 风险统计
     * @return
     */
    @RequestMapping("/getSumStatistics")
    public ResultDTO getSumStatistics(){
        HashMap<String, Object> data = tRiskStatisticsService.getRiskStatistics();
        return ResultDTO.successOf(data, GeneralResponseEnums.SUCCESS);
    }
}
